def primes(max) :
	max = int(max)
	primes = []
	isPrime = {}
	print "initialize.."
	for i in range(2, max) :
		isPrime[i] = True
	print "seive.."
	for i in range(2, max) :
		if isPrime[i] :
			for j in range(2*i, max, i) :
				isPrime[j] = False
	print "output.."
	for i in range(2, max) :
		if isPrime[i] :
			primes.append(i)
	return primes